<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登录</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="author" content="shiva"/>
    <meta name="renderer" content="webkit"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link rel="stylesheet" type="text/css" th:href="@{/fms.css}" media="all">
    <script th:src="@{/plugin/vue.global.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/plugin/vant/index.css}" media="all">
    <script th:src="@{/plugin/vant/vant.min.js}"></script>
    <link rel="icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
    <link rel="shortcut icon" th:href="@{/images/favicon.ico}"/>
</head>
<body>
<div id="app">
    <div style="margin: auto;text-align: center">
        <div>
            <img src="/images/material/圣诞树.png" style="max-width: 80%"/>
        </div>
        <div style="margin: auto">
            <input v-model="pwd" placeholder="请输入登录密码" class="pwd-init-input"/>
            <br/>
            <br/>
            <van-button type="danger" @click="login">确认密码</van-button>
        </div>
    </div>
</div>
<script>
    Vue.createApp({
        el: '#app',
        data() {
            return {
                pwd: ''
            }
        },
        methods: {
            login() {
                this.pwd = this.pwd.trim()
                if (this.pwd == null || this.pwd.length === 0) {
                    vt4.showNotify({
                        type: 'danger',
                        message: '请先输入密码！'
                    });
                    return false;
                }
                window.location.href = '/m/login?pwd=' + this.pwd
            }
        }
    }).use(vant).use(vant.Lazyload).mount("#app");
    const vt4 = vant;
</script>
</body>
</html>